//
//  GWSheetViewCell.m
//  ShandsMod
//
//  Created by zh_s on 2019/11/18.
//  Copyright © 2019 zh_s. All rights reserved.
//

#import "GWSheetViewCell.h"

@implementation GWSheetViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.accessoryType = UITableViewCellAccessoryNone;
        self.backgroundColor = [UIColor clearColor];
        [self createView];
    }
    return self;
}

- (void)createView {
    
    UIImageView *iconImg = [[UIImageView alloc] init];
    [self.contentView addSubview:iconImg];
    iconImg.image = IMAGE_NAME(@"sheet_select");
    [iconImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(25);
        make.centerY.mas_equalTo(self.contentView.mas_centerY);
        make.height.mas_equalTo(21);
        make.width.mas_equalTo(21);
    }];
    _iconImg = iconImg;
    
    
    UILabel *titleLab = [[UILabel alloc] init];
    [self.contentView addSubview:titleLab];
    titleLab.textColor = MAIN_BACKCOLOR;
    titleLab.font = FONT_NAME(FONT_Regular, 14);
    titleLab.text = @"titleName";
    [titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(60);
        make.centerY.mas_equalTo(self.contentView.mas_centerY);
        make.height.mas_equalTo(54);
        make.width.mas_equalTo(SCREEN_WIDTH - 40);
    }];
    _titleLab = titleLab;
    
    UIImageView *arrowImage = [[UIImageView alloc] init];
    [self.contentView addSubview:arrowImage];
    //icon_walletList_sel
    arrowImage.image = IMAGE_NAME(@"icon_walletList_nol");
    [arrowImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(self.mas_right).mas_offset(-23);
        make.centerY.mas_equalTo(self.contentView.mas_centerY);
        make.size.mas_equalTo(CGSizeMake(18, 18));
    }];
    _arrowImage = arrowImage;
    
}

@end
